<div class="tab-pane fade" id="Pushover" role="tabpanel" aria-labelledby="Pushover">
  <div class="card mb-4">
    <div class="card-header d-flex fs-5">
      <button class="btn d-md-none flex-grow-1 text-start" data-bs-target="#collapse-tab-Pushover" data-bs-toggle="collapse" aria-controls="collapse-tab-Pushover">
        Pushover API
      </button>
      <span class="d-none d-md-block">Pushover API</span>
    </div>
    <div id="collapse-tab-Pushover" class="card-body collapse" data-bs-parent="#user-content">
      <form data-id="pushover" class="form well" method="post">
        <input type="hidden" value="0" name="evaluate_x_prio">
        <input type="hidden" value="0" name="only_x_prio">
        <input type="hidden" value="0" name="active">
        <div class="row">
          <div class="col-sm-1">
            <p class="text-muted"><a href="https://pushover.net" target="_blank"><img src="" class="img img-fluid"></a></p>
          </div>
          <div class="col-sm-10">
            <p class="text-muted">{{ lang.user.pushover_info|format(mailcow_cc_username)|raw }}</p>
            <p class="text-muted">{{ lang.edit.pushover_vars|raw }}: <code>{SUBJECT}</code>, <code>{SENDER}</code>, <code>{SENDER_ADDRESS}</code>, <code>{SENDER_NAME}</code>, <code>{TO_NAME}</code>, <code>{TO_ADDRESS}</code>, <code>{MSG_ID}</code></p>
            <div class="row">
              <div class="col-sm-6 mb-2">
                <div class="form-group">
                  <label for="token">API Token/Key (Application)</label>
                  <input type="text" class="form-control" name="token" maxlength="30" value="{{ pushover_data.token }}" required>
                </div>
              </div>
              <div class="col-sm-6 mb-2">
                <div class="form-group">
                  <label for="key">User/Group Key</label>
                  <input type="text" class="form-control" name="key" maxlength="30" value="{{ pushover_data.key }}" required>
                </div>
              </div>
              <div class="col-sm-6 mb-2">
                <div class="form-group">
                  <label for="title">{{ lang.user.pushover_title }}</label>
                  <input type="text" class="form-control" name="title" value="{{ pushover_data.title }}" placeholder="Mail">
                </div>
              </div>
              <div class="col-sm-6 mb-2">
                <div class="form-group">
                  <label for="text">{{ lang.user.pushover_text }}</label>
                  <input type="text" class="form-control" name="text" value="{{ pushover_data.text }}" placeholder="You've got mail 📧">
                </div>
              </div>
              <div class="col-sm-12 mb-4">
                <div class="form-group">
                  <label for="text">{{ lang.user.pushover_sender_array|raw }}</label>
                  <input type="text" class="form-control" name="senders" value="{{ pushover_data.senders }}" placeholder="sender1@example.com, sender2@example.com">
                </div>
              </div>
              <div class="col-sm-12 mb-2">
              <div class="form-group">
                <label for="sound">{{ lang.edit.pushover_sound }}</label><br>
                <select name="sound" class="form-control">
                  <option value="pushover"{% if pushover_data.attributes.sound == 'pushover' %} selected{% endif %}>Pushover (default)</option>
                  <option value="bike"{% if pushover_data.attributes.sound == 'bike' %} selected{% endif %}>Bike</option>
                  <option value="bugle"{% if pushover_data.attributes.sound == 'bugle' %} selected{% endif %}>Bugle</option>
                  <option value="cashregister"{% if pushover_data.attributes.sound == 'cashregister' %} selected{% endif %}>Cash Register</option>
                  <option value="classical"{% if pushover_data.attributes.sound == 'classical' %} selected{% endif %}>Classical</option>
                  <option value="cosmic"{% if pushover_data.attributes.sound == 'cosmic' %} selected{% endif %}>Cosmic</option>
                  <option value="falling"{% if pushover_data.attributes.sound == 'falling' %} selected{% endif %}>Falling</option>
                  <option value="gamelan"{% if pushover_data.attributes.sound == 'gamelan' %} selected{% endif %}>Gamelan</option>
                  <option value="incoming"{% if pushover_data.attributes.sound == 'incoming' %} selected{% endif %}>Incoming</option>
                  <option value="intermission"{% if pushover_data.attributes.sound == 'intermission' %} selected{% endif %}>Intermission</option>
                  <option value="magic"{% if pushover_data.attributes.sound == 'magic' %} selected{% endif %}>Magic</option>
                  <option value="mechanical"{% if pushover_data.attributes.sound == 'mechanical' %} selected{% endif %}>Mechanical</option>
                  <option value="pianobar"{% if pushover_data.attributes.sound == 'pianobar' %} selected{% endif %}>Piano Bar</option>
                  <option value="siren"{% if pushover_data.attributes.sound == 'siren' %} selected{% endif %}>Siren</option>
                  <option value="spacealarm"{% if pushover_data.attributes.sound == 'spacealarm' %} selected{% endif %}>Space Alarm</option>
                  <option value="tugboat"{% if pushover_data.attributes.sound == 'tugboat' %} selected{% endif %}>Tug Boat</option>
                  <option value="alien"{% if pushover_data.attributes.sound == 'alien' %} selected{% endif %}>Alien Alarm (long)</option>
                  <option value="climb"{% if pushover_data.attributes.sound == 'climb' %} selected{% endif %}>Climb (long)</option>
                  <option value="persistent"{% if pushover_data.attributes.sound == 'persistent' %} selected{% endif %}>Persistent (long)</option>
                  <option value="echo"{% if pushover_data.attributes.sound == 'echo' %} selected{% endif %}>Pushover Echo (long)</option>
                  <option value="updown"{% if pushover_data.attributes.sound == 'updown' %} selected{% endif %}>Up Down (long)</option>
                  <option value="vibrate"{% if pushover_data.attributes.sound == 'vibrate' %} selected{% endif %}>Vibrate Only</option>
                  <option value="none"{% if pushover_data.attributes.sound == 'none' %} selected{% endif %}> None (silent) </option>
                </select>
              </div>
            </div>
            <div class="col-sm-12">
                <div class="form-check">
                  <label><input type="checkbox" class="form-check-input" value="1" name="active"{% if pushover_data.active == '1' %} checked{% endif %}> {{ lang.user.active }}</label>
                </div>
              </div>
              <div class="col-sm-12">
                <legend style="cursor:pointer;margin-top:10px" data-bs-target="#po_advanced" unselectable="on" data-bs-toggle="collapse">
                  <i style="font-size:10pt;" class="bi bi-plus-square"></i> {{ lang.user.advanced_settings }}
                </legend>
                <hr />
              </div>
              <div class="col-sm-12 mb-4">
                <div id="po_advanced" class="collapse">
                  <div class="form-group">
                    <label for="text">{{ lang.user.pushover_sender_regex }}</label>
                    <input type="text" class="form-control mb-4" name="senders_regex" value="{{ pushover_data.senders_regex }}" placeholder="/(.*@example\.org$|^foo@example\.com$)/i" regex="true">
                    <div class="form-check">
                      <label><input type="checkbox" class="form-check-input" value="1" name="evaluate_x_prio"{% if pushover_data.attributes.evaluate_x_prio == '1' %} checked{% endif %}> {{ lang.user.pushover_evaluate_x_prio|raw }}</label>
                    </div>
                    <div class="form-check">
                      <label><input type="checkbox" class="form-check-input" value="1" name="only_x_prio"{% if pushover_data.attributes.only_x_prio == '1' %} checked{% endif %}> {{ lang.user.pushover_only_x_prio|raw }}</label>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="btn-group mass-actions-user mb-2" data-acl="{{ acl.pushover }}">
              <a class="btn btn-sm btn-xs-half d-block d-sm-inline btn-success" data-action="edit_selected" data-id="pushover" data-item="{{ mailcow_cc_username }}" data-api-url='edit/pushover' data-api-attr='{}' href="#">{{ lang.user.save }}</a>
              <a class="btn btn-sm btn-xs-half d-block d-sm-inline btn-secondary" data-action="edit_selected" data-id="pushover-test" data-item="{{ mailcow_cc_username }}" data-api-url='edit/pushover-test' data-api-attr='{}' href="#"><i class="bi bi-check-all"></i> {{ lang.user.pushover_verify }}</a>
              <a id="pushover_delete" class="btn btn-sm d-block d-sm-inline btn-danger" data-action="edit_selected" data-id="pushover-delete" data-item="{{ mailcow_cc_username }}" data-api-url='edit/pushover' data-api-attr='{"delete":"true"}' href="#"><i class="bi bi-trash"></i> {{ lang.user.remove }}</a>
            </div>
          </div>
        </div>
      </form>
    </div>
  </div>
</div>
